import pygame
import os
 
os.environ['SDL_VIDEO_CENTERED'] = '1'
 
pygame.init()
try:
    screen = pygame.display.set_mode((400, 300))
 
    # This should show a blank 400 by 300 window centered on the screen
    pygame.display.set_caption('Primera ventanaaaa')
 
    while True:
        event = pygame.event.wait()
        if event.type == pygame.QUIT:
            break
finally:
    pygame.quit()  # Keep this IDLE friendly 


